package com.tarena.lbs.message.web.consumer;

import com.tarena.lbs.message.web.service.TriggerService;
import com.tarena.lbs.pojo.message.event.TriggerMsgEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TriggerMsgConsumer {
    @Autowired
    private TriggerService triggerService;
    @StreamListener("trigger-msg-input")
    public void triggerMsgConsume(TriggerMsgEvent event){
        triggerService.triggerMsg(event);
    }
}
